<template>
  <el-card class="box-card">
    <div slot="header" class="clearfix">
      <span class="h4">{{ title }}</span>
      <!--<el-button type="primary" icon="el-icon-refresh" size="mini">创建</el-button>-->
      <div class="fr">
        <el-button type="success" size="mini" class="fl mr10" icon="el_icon_back" @click="back">
          返回
        </el-button>
        <!--<el-button type="success" size="mini" class="fl mr10">列表</el-button>-->
      </div>
    </div>
    <el-row class="clearfix" type="flex" justify="center">

      <el-col :md="12" :sm="22" :xs="22">
        <slot name="form"/>
        <slot/>
      </el-col>

    </el-row>
    <el-row :gutter="0" class="pdt10 bdt" type="flex" justify="center">
      <el-col :md="12" :sm="22" :xs="22">
        <el-button type="danger" size="mini" class="fl" @click="reset">撤销</el-button>
        <el-button type="primary" size="mini" class="fr" @click="submit">提交</el-button>
      </el-col>
    </el-row>
  </el-card>
</template>

<script>
export default {
  props: {
    // title: {
    //     type: String,
    //     default: '创建'
    // },
  },
  data() {
    return {
      title: ''
    }
  },

  created() {
    this.title = this.$route.meta.title1
  },
  methods: {
    back() {
      this.$router.go(-1)
    },
    submit() {
      this.$emit('submit')
    },
    reset() {
      this.$emit('reset')
    }
  }
}
</script>

<style scoped>

</style>
